home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 4 / Apprentice-Release4.iso / Utilities / Programming / EnterAct 3.5 / Drag_on Modules / hAWK programs / $hAWK_Index_Fixer < prev    next >
Encoding:
Text File  |  1992-12-27  |  840 b   |  22 lines  |  [TEXT/KEEN]

  1. # $hAWK_Index_Fixer: if you edit your hAWK User’s Manual
  2. # (your author here does that a lot) you can repair the
  3. # Active Index at the end of the manual with this program.
  4. # You’ll need to know how many lines you added, and where.
  5. # In brief:
  6. #    if ($i+0 > line where you inserted new material)
  7. #        $i += number of consecutive lines added
  8. #    - if you delete lines, use $i -= num lines deleted.
  9. #Needless to say, run it on the index only; one way (safe)
  10. #is to copy the Active Index to an untitled window, then
  11. #run this program on “All of front text”; afterwards, take
  12. #the results from stdout and paste over the old Active Index.
  13.  
  14. {    for (i = 2; i <= NF; ++i)
  15.         {
  16.         #CHANGE THE TWO NUMBERS on the next lines
  17.         #No not the zero the other two
  18.         if ($i+0 > 798)     #line where new material inserted
  19.             $i += 4;        #number of lines added
  20.         }
  21.     print
  22.     }